class Point {
    constructor (x, y) {
        // 一次向类添加多个属性
        Object.assign(this, {x, y})
    }
}
let p = new Point(1, 2)
console.log(p.x)
console.log(p.y)
